/**
 * 
 */
package auction.chapter08;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

/**
 * @author Wei Sun
 *
 */
public class UserCompFKToCompNonPK implements Serializable{
	
	private Long id;
	
	private String firstName;
	private String lastName;
	
	private Set<ItemCompFKToCompNonPK> items=new HashSet<ItemCompFKToCompNonPK>();

	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Set<ItemCompFKToCompNonPK> getItems() {
		return items;
	}
	public void setItems(Set<ItemCompFKToCompNonPK> items) {
		this.items = items;
	}
	
	public void add(ItemCompFKToCompNonPK i){
		this.items.add(i);
		i.setUser(this);
	}
}
